#

| Chapter 30 vi Tips and Tricks |

## 30.3 Mice vs. vi

[This article is taken from a posting on Usenet (1.33). Those of you who aren't familiar with Usenet might not know that people who post replies to articles by others often include sections of the previous postings to which they are replying. These included sections are "quoted" by preceding them with `>`. Sometimes, as in this article, you'll see a quote within a quote, indicated by `>>`. Here, the original posting was from John Bruner (`>>`). Pierce Wetter (`>`) replied to John. Chris Torek then replied to Pierce, including some of John's original posting. Chris later called this article "largely religious flamage"-an argument based largely on opinion rather than fact, with no real resolution possible. But I think it has some important points to make about editors like vi: an editor that requires a mouse is not always fastest or best for the job. Besides, flames are fun to read. `:-)`-JP]

> From: Chris Torek <chris%umcp-cs.uucp@BRL.ARPA>
> Subject: Re: Porting UNIX Applications to the Mac
> Date: 16 Sep 86 09:02:17 GMT
> To: info-unix@brl-sem.arpa
> `>`In article <15372@mordor.ARPA> jdb@mordor.UUCP (John Bruner) writes:
> `>>`I am far more productive with "vi" on UNIX than with any of
> `>>`the mouse-based editors I've run across on the Mac.
> In article <981@cit-vax.Caltech.Edu> wetter@tybalt.caltech.edu.UUCP
> (Pierce T. Wetter) responds:
> [much laughter]
> `>`Considering my experiences ... this is the most hilarious thing I've
> `>`ever heard. When I'm programming the thing I do most often is move
> `>`around in the file. You can't tell me that pointing and clicking
> `>`with the mouse isn't faster then banging away on random cursor keys.

Yes I can, and yes it is - for me. If it is not for you, fine. (To expound a bit, I do not "bang away on random cursor keys." If I want to get three lines down from the middle of the screen, to the end of the seventh word, I might type `Mjjj7E`. I can type that sequence in about a half-second. When I use a Sun, it typically takes me about four seconds to find the mouse, point, click, and find the keyboard again.)

> `>`It's true that you can go directly to a specific line number but
> `>`you can't easily go up five lines and over twenty characters.

`5k20l` took about a second. The real problem with this is converting a visual representation to a number of characters. It is an acquired skill, as is using a mouse.

> `>`a mouse based editor is much easier to cut & paste in (which
> `>`if you looked at code I've written you'll know why I like this -
> `>`"Who needs a for next loop I'll just paste it in five times")

That depends on a number of things. I do indeed use the Sun mouse for this at times, whenever I think it will be faster or easier.

> `>`, you need to move your hands away from the "home row" whenever you
> `>`hit the escape key or any other "control key."

I do not. I do need to move my hands significantly to use the mouse.

`>`The mouse isn't any worse (unless you have an infinite typing speed).

> `>`However, there is one small thing I should mention, I'm using a trackball
> `>`instead of a mouse ...

Actually, I would like to have a keyboard, a mouse, a trackball, a light pen, a bitpad, a touch screen, an eye tracker, and voice input, and be able to choose among these as I wish. Indeed, I think the only reasonable approach is to program for a virtual input device, and allow the connection of just about anything.

`>`Nuff Said

Indeed.

- CT in net.unix on Usenet, 16 September 1986

30.2 What We Cover |  | 30.4 Editing Multiple Files with vi